package org.wangyuhang.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.wangyuhang.dao.testDao;
import org.wangyuhang.service.testService;

@Service("testService")
public class testServiceImpl implements testService {
    @Autowired
    private testDao dao;
   /*给name赋值*/
    @Value("${jdbc.name}")
    private String name;
    /*纯注解开发就不需要setter注入了*/
  /*  public testServiceImpl(testDao dao) {
        this.dao = dao;
    }*/

    @Override
    public void print() {
        System.out.println("serviceImpl");

//        System.out.println(name);
    }
}
